1. Field of the Invention
The present invention relates generally to an improved data processing system and in particular to a method and apparatus for managing link stacks. Still more particularly the present invention provides a computer implemented method, apparatus, and computer usable program code for improved link stack misprediction resolution.
2. Description of the Related Art
In data processing systems, instructions are routinely processed to perform desired functions and thereby produce repeatable predictable results. During the processing of a sequence of instructions, many modern processors incorporate branching and prediction capabilities as part of the instruction processing operations to speed the flow of execution. This type of forward processing attempts to look ahead or predict the next operation or sequence of events based on the current instruction or set of instructions being processed. In some cases, this prediction is incorrect and must be resolved.
Typically, resolution involves backing out of the instruction sequence to a point where the environment was before the incorrect prediction occurred. To return to this known previous state or point, the purging or flushing of many instructions and pieces of related data may have occurred. During the flush operation, attempts are mode to restore or recover data representative of a state of the current process prior to the incorrect prediction. The recovery process may involve moving a series of entries from one storage location to another as well as the maintenance of a series of commands to accomplish the desired data movement.
Restoration is typically performed in a sequential manner, entry by entry, to return to the last known good instance. This sequential processing involving the movement of many entries by copying is time consuming and may cause loss of processor productivity.
In some cases, the backward chaining information may be lost or destroyed during the intervening processing operations. In such cases, there can be no graceful recovery.